﻿using System.Collections.Generic;
using System.Linq;

namespace PortalCurriculo.Domain
{
    public partial class CargoCurriculo
    {
        public List<CargoCurriculo> SelecionarPorIdCurriculo(int idCurriculo)
        {
            return Context.Instance.CargoCurriculoes.Where(c => c.IdCurriculo == idCurriculo).ToList();
        }

        public bool Existe(int idCurriculo, int idCargo)
        {
            return Context.Instance.CargoCurriculoes.Any(c => c.IdCurriculo == idCurriculo && c.IdCargo == idCargo);
        }
    }
}
